﻿using UnityEngine;
using System.Collections;

public class BulletControls : MonoBehaviour {

	float initialData;
	public float bulletSpeed = 0.2f;
	// Use this for initialization
	void Start () {
		//need to save the input data
		initialData = Controls.beenHold;
	
		//resize the bullet according to how long the player have been charging
		transform.localScale = new Vector3(100+Controls.beenHold/4,100+Controls.beenHold/4, transform.localScale.z);

		//resets the input data, that's why I saved it
		Controls.beenHold = 60;

		//a fraction of the input data is added to bulletSpeed
		bulletSpeed += initialData / 15;

					
		}
	void Update(){
		//movement
		transform.Translate (bulletSpeed, 0, 0, Space.Self);

	}
}
